@mixin clearfix {
  &:after {
    content: '';
    display: table;
    clear: both;
  }
}

@mixin scrollBar {
  ::-webkit-scrollbar {
    background-color: transparent;
    border-radius: 8px;
    height: 8px;
    width: 8px;
  }
  ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    background-clip: content-box;
    border: 1px solid transparent;
  }
  ::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.02);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
  }
  ::-webkit-scrollbar-track-piece {
    background-color: transparent;
  }
}

@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}

@mixin pct($pct) {
  width: #{$pct};
  position: relative;
  margin: 0 auto;
}

@mixin wh($width, $height) {
  width: $width;
  height: $height;
}

@mixin font($fontsize, $color, $fontweight) {
  font-size: $fontsize;
  color: $color;
  font-weight: $fontweight;
}

@mixin triangle($width, $height, $color, $direction) {
  $width: $width/2;
  $color-border-style: $height solid $color;
  $transparent-border-style: $width solid transparent;
  height: 0;
  width: 0;

  @if $direction==up {
    border-bottom: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  } @else if $direction==right {
    border-left: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  } @else if $direction==down {
    border-top: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  } @else if $direction==left {
    border-right: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }
}

@mixin fct() {
  display: flex;
  justify-content: center;
  align-items: center;
}

@mixin modalbg($color-bg: rgba(0, 0, 0, 0.2)) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: $color-bg;
}
